import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/home/Home.vue'),
    meta: {
      isTabbar: true
    }
  },
  {
    path: '/classify',
    name: 'Classify',
    component: () => import('../views/classify/Classify.vue'),
    meta: {
      isTabbar: true
    }
  },
  {
    path: '/car',
    name: 'Car',
    component: () => import('../views/car/Car.vue'),
    meta: {
      isTabbar: true
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/mine/Mine.vue'),
    meta: {
      isTabbar: true
    }
  },
  {
    path: '/profile',
    name: 'Profile',
    component: () => import('../components/conter/profile/Profile'),
    meta: {
      isTabbar: false
    }
  },
  {
    path: '/newprofile',
    name: 'NewProfile',
    component: () => import('../components/conter/newprofile/NewProfile'),
    meta: {
      isTabbar: false
    }
  }
]

const router = new VueRouter({
  linkActiveClass: 'active',
  routes
})

export default router
